package com.hqyj.javaSpringCloudAccount.service;

import com.hqyj.entity.test.City;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * Test Feign Client， name=目标微服务在注册中心注册的名字
 * 用于调用 Client-Test 微服务接口
 */
@Component
@FeignClient(name = "client-test")
public interface TestFeignClient {

    /**
     * 127.0.0.1:8080/api/test/city/1890 ---- get
     */
    @GetMapping("/api/test/city/{cityId}")
    public City getCityByCityId(@PathVariable int cityId);
}
